// import { ClassValue, clsx } from 'clsx'
// import { twMerge } from 'tailwind-merge'

// 临时替代方案
type ClassValue = string | undefined | null | false | Record<string, boolean> | ClassValue[];

function clsx(...classes: ClassValue[]): string {
  return classes.flat().filter(Boolean).join(' ');
}

function twMerge(...classes: string[]): string {
  return classes.join(' ');
}

export function cn(...inputs: ClassValue[]) {
  return twMerge(clsx(inputs));
}

export function formatDate(date: Date) {
  return new Intl.DateTimeFormat('zh-CN', {
    year: 'numeric',
    month: 'long',
    day: 'numeric',
    hour: 'numeric',
    minute: 'numeric',
  }).format(date)
}

export function formatDateTime(date: Date) {
  return new Intl.DateTimeFormat('zh-CN', {
    year: 'numeric',
    month: 'numeric',
    day: 'numeric',
    hour: 'numeric',
    minute: 'numeric',
    second: 'numeric',
  }).format(date)
} 